# 基础镜像使用java
FROM java:8
# 作者
MAINTAINER khlbat <xiaodaima2016@163.com>
# 修正时区问题
RUN bash -c 'echo "Asia/Shanghai" > /etc/timezone'
# 端口
EXPOSE 8091 8092
# 挂载目录
VOLUME /etc/shop-boot/conf
VOLUME /var/log/shop-boot
# 将jar包添加到容器中并更名为app.jar
ADD shop-boot.jar app.jar
# 运行jar包
RUN bash -c 'touch /app.jar'
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-Dspring.config.location=/etc/shop-boot/conf/application.yml","-jar","/app.jar"]
